<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>双随机计划管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
			
		});
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
        	return false;
        }
	</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li class="active"><a href="${ctx}/jh/drJh/">双随机计划列表</a></li>
	</ul>
	<form:form id="searchForm" modelAttribute="drJh" action="${ctx}/jh/drJh/list" method="post" class="breadcrumb form-search">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
		<ul class="ul-form">
			<li><label>制定部门：</label>
				<sys:treeselect id="officeZd" name="officeZd.id" value="${drJh.officeZd.id}" labelName="officeZd.name" labelValue="${drJh.officeZd.name}"
					title="制定部门" url="/sys/office/treeData?type=2&userOfficeId=${fns:getUser().getOffice().id}" cssClass="input-medium" allowClear="true" notAllowSelectParent="false"/>
			</li>  
			<li><label>管理部门：</label>
				<sys:treeselect id="officeGl" name="officeGl.id" value="${drJh.officeGl.id}" labelName="officeGl.name" labelValue="${drJh.officeGl.name}"
					title="管理部门" url="/sys/office/treeData?type=2" cssClass="input-medium" allowClear="true" notAllowSelectParent="false"/>
			</li>             
 			<li><label>计划名称：</label>
            	<form:input path="jhMc" htmlEscape="false" maxlength="50" class="input-medium"/>
			</li>       
			<li class="btns"><input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/></li>
			<li class="clearfix"></li>
		</ul>
	</form:form>
	<sys:message content="${message}"/>
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead>
			<tr>
            	<th style="width:25%">计划名称</th>
                <th>计划制定部门</th>
                <th>计划管理部门</th>
                <th style="width:25%">“双随机”事项</th>
                <th>制定人</th>
				<th>制定日期</th>
                <th>完成率</th>
				<shiro:hasPermission name="jh:drJh:edit"><th>操作</th></shiro:hasPermission>
			</tr>
		</thead>
		<tbody>
		<c:forEach items="${page.list}" var="drJh">
			<tr>
				<td><a href="${ctx}/jh/drJh/form_view?id=${drJh.id}&sxId=${drJh.sxId}">
                	${drJh.jhMc}
					
				</a></td>
                <td>${drJh.officeZd.name}</td>
                <td>${drJh.officeGl.name}</td>
				<td>${drJh.drSx.sxMc}</td>
                <td>${drJh.createBy.name}</td>

                <td><fmt:formatDate value="${drJh.createDate}" pattern="yyyy-MM-dd"/></td>
                <td><div class="progress">
                    <div class="progress-bar btn-success" role="progressbar"
                         aria-valuenow="60" aria-valuemin="0" aria-valuemax="100"
                         style="width: ${drJh.done}%;text-align:center">
                        <span><font color="#333333">${drJh.done}% 完成</font></span>
                    </div>
                    
                </div></td>                
				<shiro:hasPermission name="jh:drJh:edit"><td>
                <c:if test="${drJh.done<100}"> 
                	<a href="${ctx}/rw/drRw/form?sxId=${drJh.sxId}&jhId=${drJh.id}">生成抽查任务</a>
                <c:if test="${drJh.createBy.id eq fns:getUser().id}">    
    				<a href="${ctx}/jh/drJh/form?id=${drJh.id}&sxId=${drJh.sxId}">修改</a>
					<a href="${ctx}/jh/drJh/delete?id=${drJh.id}" onClick="return confirmx('确认要删除该双随机计划吗？', this.href)">删除</a>
                </c:if>  
                </c:if>   
				</td></shiro:hasPermission>
			</tr>
		</c:forEach>
		</tbody>
	</table>
	<div class="pagination">${page}</div>
</body>
</html>